OPTIONS = -std=gnu++0x -g -O0
all: sample hdr

hdr: hdr.cpp PFMImage.o loadPNM.o
	g++ $(OPTIONS) -o hdr hdr.cpp PFMImage.o loadPNM.o

sample: main.cpp loadPNM.o
	g++ $(OPTIONS) -o sample main.cpp loadPNM.o

loadPNM.o: loadPNM.h
	g++ $(OPTIONS) -c loadPNM.cpp

PFMImage.o: PFMImage.cpp PFMImage.h
	g++ $(OPTIONS) -c PFMImage.cpp

clean:
	rm *.o hdr sample
